package orange.play.c2dm.utils;

import java.io.IOException;

public class SendMessageToDevice {

	public static void main(String[] args) throws IOException {
		// "Message to your device." is the message we will send to the Android
		// app
		int responseCode = MessageUtil.sendMessage(
				  ServerConfiguration.AUTHENTICATION_TOKEN,
				  ServerConfiguration.REGISTRATION_ID, "coucou");
		/*int responseCode = 200;
		int j=0;
		for (j = 0; responseCode == 200; j++) {
			
			  responseCode = MessageUtil.sendMessage(
			  ServerConfiguration.AUTHENTICATION_TOKEN,
			  ServerConfiguration.REGISTRATION_ID, "coucou" + j);
			 
			if (j % 2 == 0) {
				try {
					System.out.println(j + " messages sent");
					Thread.sleep(1000);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}
		System.out.println(j);*/
	}

}
